﻿using SFML.Graphics;

namespace Midisplay
{
    internal class KeyData
    {
        public int ID;

        public bool WhiteOrBlack;

        public RectangleShape Shape;

        private Color _keyPressedColor = new Color(0x77bbddff);

        public KeyData(int id, bool whiteOrBlack, RectangleShape shape)
        {
            ID = id;
            WhiteOrBlack = whiteOrBlack;
            Shape = shape;
        }

        public void OnKeyDown()
        {
            Shape.FillColor = _keyPressedColor;
        }

        public void OnKeyUp()
        {
            Shape.FillColor = WhiteOrBlack ? Color.White : Color.Black;
        }
    }
}
